using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace LPrisaMVC.Entities
{
    public partial class DETALLEVENTA
    {
        public int Id { get; set; }
        public int ProductoId { get; set; }
        public int VentaId { get; set; }
        [Display(Name = "Cantidad")]
        [Required(ErrorMessage = "La Cantidad es requerida")]
        public decimal Cantidad { get; set; }

        [Display(Name = "Precio")]
        [Required(ErrorMessage = "El Precio es requerido")]
        public decimal Precio { get; set; }

        public decimal Monto { get { return Cantidad * Precio; } }
        public virtual PRODUCTO PRODUCTO { get; set; }
        public virtual VENTA VENTA { get; set; }
    }
}
